﻿<%@ Page Language="C#" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
</head>
<body>
<%
    string iid = Request.Params["iid"];
    if (iid == null || iid == "")
    {
        Response.Write("ERROR");
    }
    else
    {
        CmsDataContext db = new CmsDataContext();

        try
        {
            Invite invite = (from aI in db.Invite
                             where aI.ID == iid
                             select aI).First();
            invite.Accepted = DateTime.Now;

            db.SubmitChanges();

            Response.Write("SUCCESS");
        }
        catch (Exception e)
        {
            Response.Write(e.Message);
        }
    }
%>
</body>
</html>